package edu.upf.opencities.dao.connection;

import java.util.List;

import edu.upf.opencities.datamodel.User;

public interface CassandraUserConnector {

	/**
	 * 
	 * Cassandra connection method
	 */
	public void connect();
	
	public void connectH();
	public void connectHSuper();
	
	/**
	 * 
	 * Cassandra disconnection method
	 */
	public void disconnect();
	
	/**
	 * Cassandra register user method
	 * 
	 * @param mail
	 * @param isAdmin
	 * @param userName
	 * @param userLastName
	 * @param userPassword
	 * @param company
	 * @param country
	 */
	public void registerUser(String mail, boolean isAdmin, String userName,
			String userLastName, String userPassword, String company,
			String country);
	
	/**
	 * Cassandra login user method
	 * 
	 * @param mail
	 * @param userPassword
	 * @return
	 */
	public boolean loginUser(String mail,String userPassword);
	

	/**
	 * Cassandra delete user method
	 * 
	 * @param mail
	 * @param userPassword
	 */
	public void deleteUser(String mail,String userPassword);
	
	/**
	 * Cassandra get user method
	 * 
	 * @param mail
	 * @return
	 */
	public User getUser(String mail);
	
		
	/**
	 * Cassandra get all users method
	 * 
	 * Be careful: this method returns only 10 users	
	 * @return
	 */
	public List<User> getAllUsers();
}
